<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@include file="../../../common/import-tags.jspf"%>
<sys:welcomeHeader title="<c:out value="${initParam.admin_title }"/>" />
<link type="text/css" href="${ctx}/static/sys/welcome/login/css/login.css" rel="stylesheet">
<script type="text/javascript" src="${ctx }/static/componet/jquery/plugins/jquery.base64.js"></script>
<!-- Top content -->
<div class="top-content">
	<div class="inner-bg">
		<div class="container">
			<div class="row">
				<div class="col-sm-6 col-sm-offset-3 form-box">
					<div class="form-top">
						<div class="form-top-left">
							<h3>登陆</h3>
							<p><span style="color: red;">${failMsg }</span></p>
						</div>
						<div class="form-top-right">
							<i class="fa fa-key"></i>
						</div>
					</div>
					<div class="form-bottom">
						<form role="form" method="post" class="login-form" action="${ctx }/login/in"  onsubmit="onSubmit(this)">
							<div class="form-group">
								<label class="sr-only" for="form-username">Username</label>
								 <input type="text" name="userName" placeholder="请输入用户名..."
									class="form-username form-control" id="form-username" value="${cookie['bweb_username'].value}">
							</div>
							<div class="form-group">
								<label class="sr-only" for="form-password">Password</label>
								<input type="password" name="password" placeholder="请输入密码..."
									class="form-password form-control" id="form-password"  value="${cookie['bweb_pwd'].value}">
							</div>
							<c:if test="${not empty showCaptch}">
							<div class="form-group">
								<input type="text" name="authCode" placeholder="请输入验证码" >
								<img id="authCode" alt="验证码" src="${ctx}/jcaptcha/img">
								<a href="javascript:void(0);" onclick="refreshImg();">看不清</a>
							</div>
							</c:if>
							<div >
							     <input id="rememberMe" type="checkbox" name="rememberMe" value="true" <c:if test="${cookie['bweb_rememberMe'].value eq 'true' }" >checked="true"</c:if>   >记住我
							     <button type="submit" class="btn btn-success">登陆</button>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		function refreshImg()
		{
			$("#authCode").attr("src","${ctx}/jcaptcha/img?rnd="+ Math.random());
		}
		/**
		**提交数据
		**/
		function onSubmit(form)
		{
			var pwd=$("#form-password").val();
			var epwd=$.base64.encode(pwd);
			$("#form-password").val(epwd);
		}
	</script>
</div>
<sys:welcomeFooter />